import zButton from './button/button'
import { Object } from 'core-js';

import filters from './filters';

import theConfirm from './plugs'
const mycomponents = {
    zButton
}
const myplugs={
    confirm:theConfirm
}

const components = {
    install(Vue) {
        // 处理组件
        Object.keys(mycomponents).forEach((key) => {
            Vue.component(key, mycomponents[key])
        })
        // 处理插件
        Object.keys(myplugs).forEach((key) => {
            // Vue.component(components[key].name, components[key])
            Vue.prototype['$'+key] = myplugs[key];
    
        })

        // 处理过滤器
        Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));
    }
}